home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Scope
/
Scope Disk #058 (199x)(Scope PD)(US)[WB].zip
/
Scope Disk #058 (199x)(Scope PD)(US)[WB].adf
/
B1Subs
/
PaletRead
(
.txt
)
< prev
next >
Wrap
AmigaBASIC Source Code
|
1989-01-24
|
632b
|
30 lines
'ReadColors
' CHDIR ":BMAPS"
LIBRARY "intuition.library"
DECLARE FUNCTION ViewPortAddress&() LIBRARY
ColorRead:
COLOR 3:LOCATE 24,15:PRINT "WORKING!";
COLOR 1:LOCATE 1,1
FOR ColorNum=0 TO WINDOW(6)
vpa&=ViewPortAddress&(WINDOW(7))
ColorTable&=PEEKL(PEEKL(vpa&+4)+4)
r=PEEK(ColorTable&+2*ColorNum)
b.g=PEEK(ColorTable&+2*ColorNum+1)
g=b.g\16
b=b.g MOD 16
SOUND 60*RND+100,1,80,RND*2+1
C$(ColorNum+1)=STR$(ColorNum)+","+STR$(r/16)+","+STR$(g/16)+","+STR$(b/16)
PRINT "Color #";ColorNum;"HEX R=";r;"G=";g;", B=";b
PRINT "PALETTE";ColorNum;",";r/16;",";g/16;",";b/16
PRINT
NEXT
COLOR 2
'RETURN
COLOR 1
LIBRARY CLOSE
END